Skip to content

使用医保自费混合订单号查看下单结果

从业机构使用混合下单订单号,通过该接口主动查询订单状态,完成下一步的业务逻辑。

请求参数类型描述
mix_trade_nostring医保自费混合订单号
queryobject声明请求的查询参数
sub_mchidstring医疗机构的商户号
php
$instance->v3->medIns->orders->mixTradeNo->_mix_trade_no_->getAsync([
  'mix_trade_no' => '1217752501201407033233368318',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/med-ins/orders/mix-trade-no/{mix_trade_no}')->getAsync([
  'mix_trade_no' => '1217752501201407033233368318',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/med-ins/orders/mix-trade-no/{mix_trade_no}']->getAsync([
  'mix_trade_no' => '1217752501201407033233368318',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->medIns->orders->mixTradeNo->_mix_trade_no_->get([
  'mix_trade_no' => '1217752501201407033233368318',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/med-ins/orders/mix-trade-no/{mix_trade_no}')->get([
  'mix_trade_no' => '1217752501201407033233368318',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/med-ins/orders/mix-trade-no/{mix_trade_no}']->get([
  'mix_trade_no' => '1217752501201407033233368318',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mix_trade_nostring医保自费混合订单号
mix_pay_statusstring医保自费混合订单支付状态
UNKNOWN_MIX_PAY_STATUS | MIX_PAY_CREATED | MIX_PAY_SUCCESS | MIX_PAY_REFUND | MIX_PAY_FAIL 枚举值之一
self_pay_statusstring混合订单中自费部分的支付状态
UNKNOWN_SELF_PAY_STATUS | SELF_PAY_CREATED | SELF_PAY_SUCCESS | SELF_PAY_REFUND | SELF_PAY_FAIL | NO_SELF_PAY 枚举值之一
med_ins_pay_statusstring混合订单中自费部分的支付状态
UNKNOWN_MED_INS_PAY_STATUS | MED_INS_PAY_CREATED | MED_INS_PAY_SUCCESS | MED_INS_PAY_REFUND | MED_INS_PAY_FAIL | NO_MED_INS_PAY 枚举值之一
paid_timestring订单支付时间
passthrough_response_contentstring支付完成后医保局返回内容
payAuthNostring
payOrdIdstring
setlLatlntstring
mix_pay_typestring混合支付类型
UNKNOWN_MIX_PAY_TYPE | CASH_ONLY | INSURANCE_ONLY | CASH_AND_INSURANCE 枚举值之一
order_typestring订单类型
UNKNOWN_ORDER_TYPE | REG_PAY | DIAG_PAY | COVID_EXAM_PAY | IN_HOSP_PAY | PHARMACY_PAY | INSURANCE_PAY | INT_REG_PAY | INT_RE_DIAG_PAY | INT_RX_PAY | COVID_ANTIGEN_PAY | MED_PAY 枚举值之一
appidstring从业机构的公众号ID
sub_appidstring医疗机构的公众号ID
sub_mchidstring医疗机构的商户号
sub_openidstring用户在医疗机构AppID下的唯一标识
pay_for_relativesboolean是否代亲属支付
out_trade_nostring从业机构订单号
serial_nostring医疗机构订单号
pay_order_idstring医保局返回的支付单ID
pay_auth_nostring医保局返回的支付授权码
geo_locationstring用户定位信息
city_idstring城市ID
med_inst_namestring医疗机构名称
med_inst_nostring医疗机构编码
med_ins_order_create_timestring医保下单时间
total_feeinteger使用该接口下单的总金额
med_ins_gov_feeinteger医保局结算后,医保统筹支付金额
med_ins_self_feeinteger医保局结算后,医保个账支付金额
med_ins_other_feeinteger医保局结算后,医保其他支付金额
med_ins_cash_feeinteger医保局结算后,需要自费的金额
wechat_pay_cash_feeinteger实际需要用户微信支付的金额
cash_add_detailobject[]现金补充列表
cash_add_feeinteger现金补充金额
cash_add_typestring现金补充类型
DEFAULT_ADD_TYPE | FREIGHT | OTHER_MEDICAL_EXPENSES 枚举值之一
cash_reduce_detailobject[]现金减免列表
cash_reduce_feeinteger现金减免金额
cash_reduce_typestring现金减免类型
DEFAULT_REDUCE_TYPE | HOSPITAL_REDUCE | PHARMACY_DISCOUNT | DISCOUNT | PRE_PAYMENT | DEPOSIT_DEDUCTION 枚举值之一
callback_urlstring回调通知URL
prepay_idstring自费预下单ID
passthrough_request_contentstring医疗机构透传给医保的数据
payAuthNostring
payOrdIdstring
setlLatlntstring
extendsstring扩展字段
attachstring附加数据
channel_nostring渠道号
med_ins_test_envboolean是否到医保局测试环境下单

参阅 官方文档

Published on the GitHub by TheNorthMemory